A Presheaf Model of Parametric Type Theory
نویسندگان
چکیده
We propose a new type theory with internalized parametricity. Compared to previous similar proposals, this version comes with a denotational semantics which is a refinement of the standard presheaf semantics of dependent type theory. Further, this presheaf semantics is a refinement of the one used to interpret nominal sets with restriction. The present calculus is a candidate for the core of a proof assistant with internalized parametricity. Reynolds’s abstraction theorem can be stated in a purely syntactical way: for instance, if a function f has type (A : ?) → A → A — the type of the polymorphic identity — then the proposition (A : ?) → (P : A → ?) → (x : A) → P x → P (f Ax) holds. However this result is not provable internally, i.e., (f : (A : ?) → A → A) → (A : ?) → (P : A → ?) → (x : A) → P x → P (f Ax) is not provable. Several attempts have been made for designing an extension of dependent type theory in which such an internal form of parametricity holds. We propose another such system here. Our technical contributions are as follows: • We present a type theory which internalizes parametricity and can be seen as a simplification and generalization of the systems of [1, 2] • We provide a denotational semantics, in the form of a presheaf model, for this type theory. This model is a refinement of the presheaf semantics used to interpret nominal sets with restrictions [3, 4]. Syntax We assume a special symbol ‘0’, and a countable infinite set I of other symbols, called colors. The metasyntactic variables i, j, . . . range over colors, while φ range over I ∪ {0}. The main innovation of the type theory presented here is that terms may depend on (a finite number of) colors. We add the following constructions to the usual syntax of lambda calculi: a, p, t, A, P, T := . . . | (a,i p) | (x : A)×i P | A 3i a | a·i Remark. Here is some intuition for these new constructions: • Any type is associated with a predicate for every color. The type A 3i a expresses that a satisfies the parametricity predicate associated with the type A on color i. For each term a and color i, the term a (i 0) is the erasure of i in a. It is defined by induction on a and can be understood as a realizer of a. • The term a·i yields a proof of A 3i a (i 0). • The forms (a,i p) and (x : A) ×i P allow to locally associate parametricity proofs with a given realizer.
منابع مشابه
A Model of Parametric Dependent Type Theory in Bridge/Path Cubical Sets
The purpose of this text is to prove all technical aspects of our model for dependent type theory with parametric quantifiers [Nuyts, Vezzosi and Devriese, 2017]. It is well-known that any presheaf category constitutes a model of dependent type theory [Hofmann, 1997], including a hierarchy of universes if the metatheory has one [Hofmann and Streicher, 1997]. We construct our model by defining t...
متن کاملNormalisation by Evaluation for Type Theory, in Type Theory
We develop normalisation by evaluation (NBE) for dependent types based on presheaf categories. Our construction is formulated in the metalanguage of type theory using quotient inductive types. We use a typed presentation hence there are no preterms or realizers in our construction, and every construction respects the conversion relation. NBE for simple types uses a logical relation between the ...
متن کاملTheories of presheaf type
Let us say that a geometric theory T is of presheaf type if its classifying topos B[T ] is (equivalent to) a presheaf topos. (We adhere to the convention that geometric logic allows arbitrary disjunctions, while coherent logic means geometric and finitary.) Write Mod(T ) for the category of Set-models and homomorphisms of T . The next proposition is well known; see, for example, MacLane–Moerdij...
متن کاملNormalisation by Evaluation for Dependent Types
We develop normalisation by evaluation (NBE) for dependent types based on presheaf categories. Our construction is formulated using internal type theory using quotient inductive types. We use a typed presentation hence there are no preterms or realizers in our construction. NBE for simple types is using a logical relation between the syntax and the presheaf interpretation. In our construction, ...
متن کاملMultiversal Polymorphic Algebraic Theories
We formalise and study the notion of polymorphic algebraic theory, as understood in the mathematical vernacular as a theory presented by equations between polymorphically-typed terms with both type and term variable binding. The prototypical example of a polymorphic algebraic theory is System F, but our framework applies more widely. The extra generality stems from a mathematical analysis that ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 319 شماره
صفحات -
تاریخ انتشار 2015